<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of DrawView
 *
 * @author G011C1102
 */
class DrawView {

	public static function drawBook($img, $title, $explanation) {
//		$title = "'" . $title . "'";
		if($title === null){
			$title = " ";
		}
		echo '<span style="cursor: pointer" onclick="locate(' . $explanation . ');"><article class="grid">' . '<h3>' . $title . '</h3>
					<p class="img"><img src="' . $img . '" width="170" height="135" alt=""></p>	
					<p class="readmore">' . $explanation . '</p>
				</article></span>';
	}

	public static function drawPict($img, $title, $explanation) {
		echo '<article class="gridPict">	<h3>' . $title . '</h3>
					<p class="img"><img src="' . $img . '" width="500" height="350" alt=""></p>	
				</article>';
	}

	public static function drawPicture($img, $title) {
		if($title === null)
			$title = "Non Title";
		if($img === null)
			return ;
		echo '<img src="' . $img . '" alt="' . $title . '">';
	}

	public static function drawPictCullom($img, $title, $explanation) {
		echo '<li><img src="' . $img . '" width="80" height="40" alt=""></li>';
	}

}

?>
